<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <title>楼层简介</title>
    <script type="text/javascript" src="<c:url value='/static/js/admin/information/listFloor.js' />"></script>
</head>

<body>
<c:if test="${!empty param.msg}">
	<div class="alert alert-green fadein-top"><span class="close rotate-hover"></span><strong>提示：</strong>${param.msg}</div>
</c:if>
<form id="form" method="post" action="<c:url value='/admin/information/list' />" name="form">
<input type="hidden" id="type" name="type" value="${information.type}" />
<div class="panel admin-panel">
	<div class="panel-head"><strong>楼层列表</strong></div>
    <div class="padding border-bottom">
      	<div class="line">
	       <div class="x4">
		        <input type="button" class="button button-small checkall" name="checkall" checkfor="id" value="全选" />
		        <input onclick="locationHref('<c:url value='/admin/information/edit?type=${information.type}' />')" type="button" class="button button-small border-green" value="添加楼层" />
		        <input onclick="deleteByIds()" type="button" class="button button-small border-yellow" value="批量删除" />
	    	</div>
	    	<div class="x5"></div>
	    	<div class="x3">
	   			<div class="input-group padding-little-top"> 
	   				<input type="text" class="input input-small border-main" name="title" value="${information.title}" placeholder="请输入：标题查询" /> 
	   				<span class="addbtn"><button type="submit" class="button input-small bg-main">筛选</button></span> 
	   			</div>
	    	</div>
    	</div>
    </div>
    <table class="table table-hover">
       	<tr>
        	<th width="45">选择</th>
        	<th width="100">图片</th>
        	<th width="*">标题</th>
        	<th width="200">创建时间</th>
        	<th width="140">操作</th>
       	</tr>
       	<c:forEach items="${pager.datas}" var="pd">
       		<tr>
       			<td><input type="checkbox" name="id" value="${pd.id}" /></td>
       			<td><img src="<c:url value="${pd.image}"/>" width="72" height="40"/></td>
       			<td>${pd.title}</td>
       			<td>
       				<fmt:formatDate value="${pd.publishTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
       			</td>
       			<td>
        			<a class="button border-green button-little" href="<c:url value='/admin/information/onTop?type=${information.type}&id=${pd.id}' />">置顶</a>
        			<a class="button border-blue button-little" href="<c:url value='/admin/information/edit?type=${information.type}&id=${pd.id}' />">修改</a>
        			<a class="button border-yellow button-little" href="javascript:void(0);" onclick="deleteById('${pd.id}')">删除</a>
       			</td>
       		</tr>
       	</c:forEach>
    </table>
	  <jsp:include page="../../commons/pager.jsp">
	    	<jsp:param value="list" name="url"/>
	  </jsp:include>
</div>
</form>
</body>
</html>